<template>
    <!-- 上传对话框 -->
    <el-dialog
      title="上传"
      :visible.sync="dialogVisible"
      width="35%"
      style="text-align: center"
    >
    <el-input v-model="id" v-show="false"></el-input>
        <el-input v-model="newcover" placeholder="请填入图片链接"></el-input>
        <el-button
          type="danger"
          icon="el-icon-close"
          @click="dialogVisible = false"
          >取 消</el-button
        >
        <el-button type="success" icon="el-icon-check" @click="subcover"
          >确 定</el-button
        >
    </el-dialog>
  </template>
  <script>
export default {
    name: "Reface",
    data() {
        return {
            dialogVisible: false,
            newcover: "",
            id:""
        }
    },
    methods: {
        subcover() {
            let data = new FormData();
            data.append("newcover", this.newcover)
            data.append('id',this.id)
            this.$axios.post("/subcover", data).then((resp) => {
                
              this.$router.go(0)
                     this.dialogVisible=false
                
               
            }
                
            
            )
        }
    }
}
  </script>